import 'package:flutter/material.dart';
import 'package:x3_base_core/x3_base_core.dart';

class BaseEmptyComponent extends StatelessWidget {
  final String promptText;

  const BaseEmptyComponent({Key key, this.promptText}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(vertical: 12),
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Container(width: 56, child: Icon(BaseIconData.x3NoData, size: 36, color: BaseStyles.subtitle2(context).color)),
            SizedBox(height: 10),
            Text(promptText ?? '暂无数据', style: BaseStyles.subtitle2(context)),
          ],
        ),
      ),
    );
  }
}
